<script type="text/javascript" src="<?php echo $this->baseUrl() ?>/public/js/jquery.form.js"></script>
<form id="form1" action="<?php echo $this->fullUrl('/bid/product/savestep1/') ?>" method="post">
<div class="grid_20">
	<span class="my_account">>> Két Của Tui >> Đăng Bán</span><br/><br />
	<div class="step_top">              
		<div class="grid_4 step_current alpha">
		    <div class="step_content">
		        <span class="step_name">buoc 1</span></br>	
		        <span class="step_des">(đăng ký nhóm sản phẩm)</span>
		    </div>
		</div>
		<div class="grid_1"><div class="sep_arrow"></div></div>
		
		<a href="#"><div class="grid_4 step">
		    <div class="step_content">
		        <span class="step_name">buoc 2</span></br>	
		        <span class="step_des">(đăng ký lên sàn)</span>
		    </div>
		</div></a>
		
		<div class="grid_1"><span class="sep_arrow"></span></div>                
		
		<a href="#"><div class="grid_4 step">
		    <div class="step_content">
		        <span class="step_name">buoc 3</span></br>	
		        <span class="step_des">(đăng hình sản phẩm)</span>
		    </div>
		</div></a>
		<div class="grid_1"><span class="sep_arrow"></span></div>                
		
		<a href="#"><div class="grid_4 step omega">
		    <div class="step_content">
		        <span class="step_name">buoc 4</span></br>	
		        <span class="step_des">(xác nhận)</span>
		    </div>
		</div></a>
	</div> <!-- End Step top -->                           
	<div class="clear"></div>                    
	<div class="sep_big grid_19 prefix_1 alpha"><hr/></div>        		
	<div class="clear"></div>
<script type="text/javascript">
	function getSubCat(id,level){
		var max_level = <?php echo $this->max_level?>;
		for(var i = level; i <= max_level; i++){
			$("#level_"+i).html('');
		}
		$.ajax({
			url: '<?php echo $this->fullUrl("/bid/category/getsubcat/catid/") ?>'+id,
			success: function( data ) {
				$("#level_"+level).html(data);
				$("#response_stack").html($(".stack").last().html());
			}
		});
	}
</script>
<div class="grid_19 prefix_1 alpha">
    <div class="step_content">
    Chọn một trong những nhóm sản phẩm dưới đây để miêu tả sản phẩm bạn cần lên sàn một cách tốt nhất.				
    <br />
    <div class="product_radio">
    	<ul>
		<?php foreach($this->categories as $category): ?>
			<li><input type="radio" onclick="getSubCat(<?php echo $category->id ?>,2)" name="cat_id" class="styled" value="<?php echo $category->id ?>"/><span><?php echo $category->name ?></span></li>
		<?php endforeach ?>
    	</ul>
	</div>
	<?php for($i = 2; $i <= $this->max_level + 1; $i++) : ?>
	<div class="product_radio" id="level_<?php echo $i ?>">
	</div>
	<?php endfor ?>
    	
    <div class="sep_his"><hr/></div>
	<div id="response_stack"></div> Nếu bạn đã chắc chắn cho sự lựa chọn của mình, xin vui lòng chọn tiếp tục<br />
	<br />
	</div>
	
	<div class="clear"></div>                   
	<!--<div class="prefix_6 grid_3 suffix_1 alpha"><input type="button" class="textStep" name="back" value="Quay Lại <<"></div>-->
	<div class="grid_9 omega"><input type="submit" class="textStep" name="forward" value="Tiếp Tục >>"></div>
</div> <!-- End Step Content -->
</form>
<script type="text/javascript">
	$('#form1').ajaxForm({
		success: function(){
			window.location = "<?php echo $this->fullUrl('/bid/product/create2/') ?>";
		}
	});
</script>
